#ifndef __CardUI__
#define __CardUI__

#include "Common.h"
#include "IDialog.h"

class CardUI : public IDialog<Layer>
{
public:
    CardUI();
    virtual ~CardUI();
    CREATE_FUNC(CardUI);
    virtual void onEnter();
    virtual void onExit();

    void setData(int32_t card, bool show = true);

    bool isSelected() const;
    void setSelected(bool state);

    void showFlag(bool show);

    DEFINE_PROPERTY(int32_t, m_data, Card);

protected:
    virtual const char* csbName() const {return "ui/Card.csb";}
	virtual void onUILoaded();
	
private:
    bool m_selected;
    Button* m_click;
    Sprite* flag_bg;//背面
    Sprite* flag_num;//区分
    Sprite* flag_color;//花色
    Sprite* flag_color_big;//花色
    Sprite* flag_king;//大小王
    Sprite* flag_dz;//地主标志
    Text* num;
};

#endif 

